<template>
  <div class="charts" ref="charts"></div>
</template>

<script>
export default {
  name: "",
  mounted() {
    // 引入echarts
    let echarts = require("echarts");
    //初始化echarts实例
    let lineCharts = echarts.init(this.$refs.charts);
    // 配置数据
    lineCharts.setOption({
      xAxis: {
        show: false, // 隐藏x轴
        type:'category'
      },
      yAxis: {
        show: false, // // 隐藏y轴
      },
      //系列
      series: [
        {
          type: "bar",
          data: [50, 20, 33, 11, 18,26,32],
        },
      ],
      //布局调试
      grid: {
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
      },
    });
  },
};
</script>

<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>